package com.linb.pan.storage.engine.core;

import com.linb.pan.storage.engine.core.context.*;

import java.io.IOException;

public interface StorageEngine {
    /**
     * 存储物理文件
     */
    void store(StoreFileContext context) throws IOException;

    /**
     * 删除物理文件
     */
    void delete(DeleteFileContext context) throws IOException;

    /**
     * 存储物理文件的分片
     */
    void storeChunk(StoreFileChunkContext context) throws IOException;

    /**
     * 合并物理分片文件
     */
    void mergeFile(MergeFileContext context) throws IOException;

    /**
     * 读取文件，将内容写入到输出流中
     */
    void readFile(ReadFileContext context) throws IOException;

}
